<div class="wrapper-sm">
    <div class="panel panel-default">
        <div class="row wrapper">
            <div class="col-sm-10 m-b-xs">
                <form class="form-inline" role="form">
                    <div class="form-group m-r-xs">
                        <input class="form-control input-sm" placeholder="名称" ng-model="params.name">
                    </div>
                    <div class="form-group">
                        <input class="form-control input-sm" placeholder="描述" ng-model="params.remarks">
                    </div>
                    <button type="submit" class="btn btn-sm btn-default" ng-click="search()">搜索</button>
                </form>
            </div>
            <div class="col-sm-2">
                <button ui-sref="app.sys.dict.form" class="btn btn-sm btn-default pull-right m-r-md"
                        ng-if="hasAuthority('sysdict:save')">新建
                </button>
            </div>
        </div>

        <div class="table-responsive">
            <table class="table table-striped table-bordered table-condensed text-nowrap">
                <thead>
                <tr class="b-t b-light">
                    <th ui-order-column="a.codeText">字典描述</th>
                    <th ui-order-column="a.code">字典编码</th>
                    <th ui-order-column="a.type">类型</th>
                    <th ui-order-column="a.description">类型描述</th>
                    <th ui-order-column="a.sort">排序</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in pageInfo.list">

                    <td>{{item.codeText}}</td>
                    <td>{{item.code}}</td>
                    <td>{{item.type}}</td>
                    <td>{{item.description}}</td>
                    <td>{{item.sort}}</td>

                    <td>
                        <button ui-sref="app.sys.dict.form({id: item.id})" class="btn btn-info btn-sm">详情</button>
                        <button ng-click="delete(item.id)" class="btn btn-danger btn-sm"
                                ng-if="hasAuthority('sysdict:delete')">删除
                        </button>

                        <button ui-sref="app.sys.dict.form({parentId: item.id})" class="btn btn-default btn-sm" >添加键值对</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <!-- 底部分页 -->
        <span data-ng-include=" 'tpl/blocks/pagination.html' "></span>
    </div>
</div>

